/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ru.ssau.lib;

import java.awt.GridBagConstraints;
import java.awt.Insets;
/**
 *
 * @author Дима
 */
public class GBC extends GridBagConstraints {
    public GBC(int gridx, int gridy) {
        this.gridx = gridx;
        this.gridy = gridy;
    }

    public GBC(int gridx, int gridy, int gridwidth, int gridheight) {
        this.gridx = gridx;
        this.gridy = gridy;
        this.gridheight = gridheight;
        this.gridwidth = gridwidth;
    }

    public GBC setInsets(int distance) {
        Insets ins = new Insets(distance, distance, distance, distance);
        this.insets = ins;
        return this;
    }

    public GBC setInsets(int top, int bottom, int left, int right) {
        Insets ins = new Insets(top, left, bottom, right);
        this.insets = ins;
        return this;
    }

    public GBC setAnchor(int anchor) {
        this.anchor = anchor;
        return this;
    }

    public GBC setIpad(int ipadx, int ipady) {
        this.ipadx = ipadx;
        this.ipady = ipady;
        return this;
    }

    public GBC setFill(int fill) {
        this.fill = fill;
        return this;
    }

    public GBC setWeight(int weightx, int weighty) {
        this.weightx = weightx;
        this.weighty = weighty;
        return this;
    }
}
